package boot.spring.service.impl;

import boot.spring.entity.Usersrole;
import boot.spring.mapper.UsersroleMapper;
import boot.spring.service.UsersroleService;
import boot.spring.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/*实现用户角色表的业务层接口的实现类*/
@Service
public class UsersroleServiceImpl implements UsersroleService {
    /*注入持久层*/
    @Autowired
    UsersroleMapper usersroleMapper;
    Result r=new Result();

    @Override
    public Result UrSerAdd(Usersrole uradd) {
        Integer add=usersroleMapper.UrMapAdd(uradd);
        if (add>0){
            r=new Result(0,"请求成功");
        }else{
            r=new Result(0,"失败成功");
        }
        return r;
    }

    @Override
    public Result UrSerRemove(Usersrole urRemove) {
        Integer Remove=usersroleMapper.UrMapRemove(urRemove);
        if (Remove>0){
            r=new Result(0,"请求成功");
        }else{
            r=new Result(0,"失败成功");
        }
        return r;
    }
}
